﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CCH.Lib;
using CCH.DAO;
using CCH.Entity;

public partial class _1002_1 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            int mes_no = int.Parse(Request.QueryString["mes_no"]);

            message data = new messageDAO().Get_message(mes_no);

            //1.最新消息
            //2.活動訊息
            //3.病友訊息
            //4.衛教資訊
            //5.病友與你分享
            //6.專業文章
            //7.常見問題
            string[] name = { "", "最新消息", "活動訊息", "病友訊息", "衛教資訊", "病友與你分享", "專業文章", "常見問題" };

            //this.HyperLink1.Text = name[data.type_class.Value].ConverToCN();
            //this.HyperLink1.NavigateUrl = "1002.aspx?type=" + data.type_class.Value;
            //this.lab_typeName.Text = name[data.type_class.Value].ConverToCN();
            this.lab_date.Text = data.mes_datetime.Value.ToLongDateString().ConverToCN();
            this.lab_title.Text = data.mes_title.ConverToCN();
            this.lab_content.Text = data.mes_content.ConverToCN();

            //檔案列表
            this.ObjectDataSource1.SelectParameters["mes_no"].DefaultValue = mes_no.ToString();
            this.ListView1.DataBind();
        }
    }
}